]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
tests: Remove assertArraysEqual()
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 1 Mar 2024 17:28:08 +0000 (18:28 +0100)
committerMarge Bot <marge-bot@gnome.org>
Tue, 21 May 2024 13:42:29 +0000 (13:42 +0000)
It is tied to the legacy jsUnit framework and now unused.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3164>

tests/common/assertions.js [deleted file]

diff --git a/tests/common/assertions.js b/tests/common/assertions.js
deleted file mode 100644 (file)
index c254da0..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-const JsUnit = imports.jsUnit;
-
-/**
- * Asserts if two arrays have the same length and each element passes assertEquals
- *
- * @template T
- * @param {string} errorMessage an error message if the arrays are not equal
- * @param {T[]} array1 the first array
- * @param {T[]} array2 the second array
- */
-export function assertArrayEquals(errorMessage, array1, array2) {
-    JsUnit.assertEquals(`${errorMessage} length`, array1.length, array2.length);
-    for (let j = 0; j < array1.length; j++)
-        JsUnit.assertEquals(`${errorMessage} item ${j}`, array1[j], array2[j]);
-}